import 'package:flutter/material.dart';
import 'package:flutter_ok/value/colours.dart';

/// App Theme Style
ThemeData get appTheme => ThemeData(
      primaryColor: Colours.primary,
      primaryColorLight: Colours.primaryLight,
      scaffoldBackgroundColor: Colors.white,
      accentColor: Colours.primary,
      appBarTheme: _appBarTheme,
      bottomNavigationBarTheme: _bottomNavigationBarTheme,
      textTheme: _textTheme,
      cardTheme: _cardTheme,
      textButtonTheme: _textButtonTheme,
      elevatedButtonTheme: _elevatedButtonTheme,
      outlinedButtonTheme: _outlinedButtonTheme,
      dividerTheme: _dividerThemeData,
    );

/// AppBar Style
AppBarTheme get _appBarTheme => AppBarTheme(
      centerTitle: true,
      elevation: 0,
      backgroundColor: Colours.primary,
      titleTextStyle: TextStyle(fontSize: 18.0),
      iconTheme: IconThemeData(
        color: Colors.white,
      ),
    );

/// BottomNavigationBar Style
BottomNavigationBarThemeData get _bottomNavigationBarTheme =>
    BottomNavigationBarThemeData(
      unselectedLabelStyle: TextStyle(fontSize: 12),
      selectedLabelStyle: TextStyle(fontSize: 12),
      backgroundColor: Colors.white,
    );

/// Text Style
TextTheme get _textTheme => TextTheme();

/// Card Style
CardTheme get _cardTheme => CardTheme();

/// TextButton Style
TextButtonThemeData get _textButtonTheme => TextButtonThemeData(
      style: ButtonStyle(),
    );

/// ElevatedButton Style
ElevatedButtonThemeData get _elevatedButtonTheme => ElevatedButtonThemeData(
      style: ButtonStyle(),
    );

/// OutlinedButton Style
OutlinedButtonThemeData get _outlinedButtonTheme => OutlinedButtonThemeData(
      style: ButtonStyle(
        shape: MaterialStateProperty.all(
          RoundedRectangleBorder(
            borderRadius: BorderRadius.all(Radius.circular(36)),
          ),
        ),
      ),
    );

/// Divider Style
DividerThemeData get _dividerThemeData => DividerThemeData(
      thickness: 0.5,
    );
